const base_url="https://v.cpolar.io";

export const myRequest=(options)=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url: base_url + options.url,
			method: options.method || 'GET',
			data: options.data || {},
			success: (response) => {
				if (response.Success)
					return uni.showToast({
						title: '获取数据失败'
					})
					resolve(response)
			},
			fail: (err) => {
				return uni.showToast({
					title:'请求接口失败'
				})
				reject(err)
			}
		})
	})
}